package pt.ipleiria.plp.threads;

import pt.ipleiria.plp.BlackSpotterMidlet;
import pt.ipleiria.plp.Lixeiras.LixeiraSent;

/**
 * Thread For obtaining the data from a lixeira sent
 */
public class GetLixeiraSentFromServer extends Thread {

    private LixeiraSent lix;
    private BlackSpotterMidlet midlet;

    public GetLixeiraSentFromServer(LixeiraSent lix, BlackSpotterMidlet midlet) {
        this.lix = lix;
        this.midlet = midlet;
    }

    public void run() {

        String error = lix.getDataFromServer(midlet.getApp().getAppKey());

        midlet.callbackFromGetLixeiraSent(lix, error);
    }
}

